-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support multiple LDAP hosts #2776
base: master
Are you sure you want to change the base?
Conversation
3b3730d
to
d271fb7
Compare
Often there is a need to iterate through multiple LDAP hosts in the event that one has failed. DNS is one possible solution, but there are cases where that may not be desired. This change allows users to specify a comma-separated list of LDAP hosts to iterate through in case one is unreachable. Signed-off-by: Ryan Canty <[email protected]>
d271fb7
to
3562de8
Compare
@ericchiang I see you worked on the LDAP bits pretty heavily. Any thoughts on this? |
I haven't worked on dex in years. You'll have to find an actual maintainer to review :( |
Thanks for letting me know and good luck on your current endeavors 😄 @sagikazarmark or @nabokihms any thoughts on this PR? |
(I'm not a dex maintainer, so please consider this my humble, unsolicited opinion) The change to the configuration schema is backward compatible. On the one hand, it may be confusing that the
|
@dlipovetsky thanks for the feedback!
This actually isn't quite . While the connection is checked at startup time, if all of them error out, the last host in the list will be returned regardless of if the connection succeeded, I did this specifically for backwards compatibility. However, thanks for commenting on this as I realize now that I'm only calling this connection once during startup and not during invocation, which kind of defeats the goal haha. Not that any maintainers seem interested in this change anyway after 2 weeks of silence. I'll probably just end up forking dex for this and other changes that no one seems interested in addressing 🤷 But thanks again for the feedback! |
My mistake! 🤦 I see now that you're breaking out of the loop as soon as you get a successful connection. |
A silver lining! 😉 Could you accomplish your goal in Lines 310 to 348 in 70e6cc2
|
Yes I believe I can...I actually started there, but then realized I was making some breaking changes so I switched it but totally missed that that would only do the check at startup 😂 Thanks be to Code Review |
Overview
Often there is a need, as there is in my company, to iterate through multiple LDAP hosts in the event that one has failed. DNS is one possible solution, but there are cases where that may not be possible, for example with Kerberos.
What this PR does / why we need it
This change allows users to specify a comma-separated list of LDAP hosts to iterate through in case one is unreachable. It will function the same as always with one host, but will iterate through if multiple are given and the prior hosts fail.
Special notes for your reviewer
Happy to add tests if necessary, but for such a simple change, I'm not sure it is.
Does this PR introduce a user-facing change?